﻿<UserControl x:Class="CodeIn.Modules.Misc.CommandList.CommandListView"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
		xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d"
		d:DesignHeight="300" d:DesignWidth="600"
		FocusManager.FocusedElement="{x:Reference FilterTB}">

	<Grid Margin="5">
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="170" />
			<ColumnDefinition Width="auto" />
			<ColumnDefinition Width="*" />
		</Grid.ColumnDefinitions>

		<Border Grid.Column="0" BorderBrush="{DynamicResource CommonStrokeBrush}"
				BorderThickness="1">
			<DockPanel>
				<DockPanel DockPanel.Dock="Top" Background="{DynamicResource CommonAltFillBrush}">
					<TextBlock DockPanel.Dock="Left" Text="Filter:" VerticalAlignment="Center"
							Padding="3,0,5,0" Foreground="{DynamicResource CommonAltTextBrush}"
							FontWeight="Bold" />
					<TextBox BorderThickness="0" Margin="3" x:Name="FilterTB"
							Text="{Binding Filter, UpdateSourceTrigger=PropertyChanged}" />
				</DockPanel>
				<ListBox BorderBrush="{DynamicResource CommonStrokeBrush}" BorderThickness="0,1,0,0"
						ItemsSource="{Binding Commands}"
						ScrollViewer.VerticalScrollBarVisibility="Visible"
						ScrollViewer.HorizontalScrollBarVisibility="Auto"
						IsSynchronizedWithCurrentItem="True" SelectedIndex="0" />
			</DockPanel>
		</Border>

		<GridSplitter Grid.Column="1" Width="5" VerticalAlignment="Stretch"
				HorizontalAlignment="Stretch" ResizeBehavior="PreviousAndNext" Opacity="0" />

		<Border Grid.Column="2" BorderBrush="{DynamicResource CommonStrokeBrush}"
				BorderThickness="1">
			<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
				<StackPanel>
					<TextBlock FontSize="16" Text="Informations" TextAlignment="Right"
							FontStyle="Italic" Padding="0,0,15,0" Margin="0,0,0,5"
							Background="{DynamicResource CommonAltFillBrush}"
							Foreground="{DynamicResource CommonAltTextBrush}" />
					<StackPanel Orientation="Horizontal" Margin="5,0">
						<TextBlock Text="Associated commands:   " FontWeight="Bold" />
						<TextBlock Text="{Binding AssociatedCommands}" />
					</StackPanel>
					<StackPanel Orientation="Horizontal" Margin="5,0">
						<TextBlock Text="Associated module:   " FontWeight="Bold" />
						<TextBlock Text="{Binding AssociatedModule}" />
					</StackPanel>
					<StackPanel Orientation="Horizontal" Margin="5,0">
						<TextBlock Text="Revision:   " FontWeight="Bold" />
						<TextBlock Text="{Binding Revision}" />
					</StackPanel>
					<StackPanel Orientation="Horizontal" Margin="5,0">
						<TextBlock Text="Author:   " FontWeight="Bold" />
						<TextBlock Text="{Binding Author}" />
					</StackPanel>
					<StackPanel Orientation="Horizontal" Margin="5,0">
						<TextBlock Text="Short description:   " FontWeight="Bold" />
						<TextBlock Text="{Binding ShortDescription}" />
					</StackPanel>
					<TextBlock FontSize="16" Text="Help" TextAlignment="Right" FontStyle="Italic"
							Padding="0,0,15,0" Margin="0,5,0,5"
							Background="{DynamicResource CommonAltFillBrush}"
							Foreground="{DynamicResource CommonAltTextBrush}" />
					<TextBlock Text="{Binding LongDescription}" Margin="5,0" />
				</StackPanel>
			</ScrollViewer>
		</Border>

	</Grid>

</UserControl>
